<template>
  <div>
    <slot name="error">
      <!-- 默认显示的图片 -->
      <img :src="srcImg" class="img_container" alt="">
    </slot>
  </div>
</template>

<script>
export default {
  name: '',
  props: {
    // 默认展示图片
    srcImg: {
      type: String,
      default: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F03%2F16%2F90%2F5b5bb4f5aeda5_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1668906409&t=c6019d17df358908ed2310edd84fc896'
    }

  }
}
</script>

<style scoped>
.img_container{
  width: 100px;
  height: 100px;
  border-radius: 50%;
}
</style>
